package com.medical.standard.entity;

public class Term {
    private Integer termId;
    private Integer standardId;
    private String projectNum;
    private String termName;
    private String definition;

    public Term() {}

    public Term(Integer standardId, String projectNum, String termName, String definition) {
        this.standardId = standardId;
        this.projectNum = projectNum;
        this.termName = termName;
        this.definition = definition;
    }

    // getter和setter方法
    public Integer getTermId() { return termId; }
    public void setTermId(Integer termId) { this.termId = termId; }

    public Integer getStandardId() { return standardId; }
    public void setStandardId(Integer standardId) { this.standardId = standardId; }

    public String getProjectNum() { return projectNum; }
    public void setProjectNum(String projectNum) { this.projectNum = projectNum; }

    public String getTermName() { return termName; }
    public void setTermName(String termName) { this.termName = termName; }

    public String getDefinition() { return definition; }
    public void setDefinition(String definition) { this.definition = definition; }

    @Override
    public String toString() {
        return String.format("术语[编号=%s, 术语=%s, 定义=%s]",
                projectNum, termName,
                definition != null && definition.length() > 20 ?
                        definition.substring(0, 20) + "..." : definition);
    }
}